package cn.xopencode.securityservice.rpc.suggest.dto;

import cn.xopencode.common.framework.validator.InEnum;
import cn.xopencode.common.framework.validator.Mobile;
import cn.xopencode.securityservice.enums.suggest.SuggestLevelEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 添加创新与合理化建议情况 Request DTO
 */
@Data
@Accessors(chain = true)
public class SuggestCreateReqDTO implements Serializable {


    /**
     * 建议级别
     */
    @NotNull(message = "建议级别不能为空")
    @InEnum(value = SuggestLevelEnum.class, message = "建议级别必须是 {value}")
    @ApiModelProperty(value = "建议级别，1:车间级,2:公司级")
    private Integer suggestLevel;

    /**
     * 备注
     */
    @Length(min = 0, max = 50, message = "备注内容长度为 0-50 位")
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 提出建议内容
     */
    @NotNull(message = "提出建议内容 不能为空")
    @Length(min = 0, max = 200, message = "提出建议内容长度为 0-200 位")
    @ApiModelProperty(value = "提出建议内容")
    private String content;

    /**
     * 提出时间
     */
    @NotNull(message = "提出时间不能为空")
    @ApiModelProperty(value = "提出时间", example = "2021-06-06")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date suggestTime;

    /**
     * 积分
     */
    @ApiModelProperty(hidden = true)
    private Double score;
}
